{extend name="index_layout"/}
{block name="main"}
<div class="layui-card">
    <div class="layui-card-header">用户提现管理</div>
    <div class="layui-card-body">
        <div class="layui-form">
            <table class="layui-hide" id="currentTable" lay-filter="currentTable"
                   data-auth-add="{:$auth->check('withdrawal/add')}"
                   data-auth-edit="{:$auth->check('withdrawal/edit')}"
                   data-auth-delete="{:$auth->check('withdrawal/del')}"
                   data-auth-recyclebin="{:$auth->check('withdrawal/recyclebin')}"
            ></table>
        </div>
    </div>
</div>
<script type="text/html" id="barTool">
    <a data-open='{:url("edit")}?id={{ d.id }}'
       class="layui-btn layui-btn-xs {:$auth->check('special/edit')?'':'layui-hide'}" title="审核">审核</a>
    <a href='{:url("del")}?id={{ d.id }}'
       class="layui-btn layui-btn-danger layui-btn-xs layui-tr-del {:$auth->check('item/del')?'':'layui-hide'}"><i
            class='iconfont icon-trash_fill'></i></a>

</script>
{/block}
{block name="script"}
<script type="text/javascript">
    layui.use('yznTable', function () {
        var table = layui.yznTable;

        var init = {
            table_elem: '#currentTable',
            table_render_id: 'currentTable',
            add_url: '{:url("add")}',
            edit_url: '{:url("edit")}',
            delete_url: '{:url("del")}',
            modify_url: "{:url('multi')}",
            recyclebin_url: "{:url('recyclebin')}",
        };

        table.render({
            init: init,
            toolbar: ['refresh', 'delete'],
            url: '{:url("index")}',
            cols: [
                [
                    {type: 'checkbox', fixed: 'left'},
                    {field: 'id', title: 'ID', minWidth: 80,search: false},
                    {
                        field: 'member.nickname',
                        align: 'center',
                        title: '昵称',
                        minWidth: 80,
                        searchOp: 'LIKE',
                        minWidth: 110
                    },

                    {field: 'title', align: 'center',search: false, title: '标题', minWidth: 80, searchOp: 'LIKE', minWidth: 110},
                    {
                        field: 'before_money',
                        align: 'center',
                        title: '提现之前金额',
                        minWidth: 80,
                        search: false,
                        searchTip: '提现之前金额'
                    },
                    {
                        field: 'type', title: '类型',
                        align: 'center',
                        templet: yznTable.formatter.label,
                        selectList: {1: '团队提现', 2: '财税顾问提现',3:'保证金提现'}
                    },
                    {
                        field: 'money',
                        align: 'center',
                        title: '提现金额',
                        minWidth: 80,

                        search: false,
                        searchTip: '提现金额'
                    },
                    {
                        field: 'status',
                        align: 'center',
                        width: 120,
                        title: '状态',
                        templet: yznTable.formatter.status,
                        selectList: {
                            0: '申请中',
                            1: '通过',
                            2: '拒绝',
                        },
                    },
                    {
                        field: 'create_time',
                        title: '创建时间',
                        minWidth: 80,
                        width: 180,
                        search: 'range',
                        templet: yznTable.formatter.datetime
                    },
                    {fixed: 'right', align: 'center', width: 180, title: '操作', toolbar: '#barTool'}

                ]
            ],
            page: {}
        });

        yznTable.bindevent();
    });
</script>
{/block}